

const char* TextureMixShader_frag = STRINGIFY(
 \n#ifdef GL_ES\n
 precision mediump float;
 \n#endif\n
 
 varying vec4 v_fragmentColor;
 varying vec2 v_texCoord;
                                           

 uniform float downDistancef;
 uniform float upDistancef;
 uniform float minHeight;
 uniform float maxHeight;
 void main() {
     vec4 color1 = texture2D(CC_Texture0, v_texCoord);
    
     float posY = 1.0-v_texCoord.y;
     if(posY<minHeight)
         discard;
     if(posY>(maxHeight+upDistancef))
         discard;
     if(posY>minHeight+downDistancef){
         float f = max(0.0, (posY-maxHeight)/upDistancef);
         color1 = color1*(1.0-f);
     }else {
         float f = min(1.0, (posY-minHeight)/downDistancef);
         color1 = color1*f;
     }
    gl_FragColor = color1;
     
     
 }
 );
